#include "thread.hpp"
#include <iostream>
#include <unistd.h>
#include <vector>
using namespace std;

void* print(void* args) 
{
    while(true)
    {
        printf("%d hello class_thread!\n", pthread_self()); 
        sleep(1);
    }
    return nullptr;
}

int main()
{
    vector<Thread> v;
    for(int i = 0; i < 10; ++i)
        v.push_back(Thread(print, nullptr));
    for(auto& e: v) e.run();
    for(auto& e: v) e.join();
    return 0;
}